<include file="Public/base"/>
<body>
    <div class="page-container">
        <form action="" method="POST" class="form form-horizontal" id="commentFrom">
           
           
              <div class="row cl">
               
          
                <label class="form-label col-xs-4 col-sm-2">申请类型：</label>
                <div class="formControls col-xs-4 col-sm-4">
                <span class="select-box">
                  <select class="select sex" size="1" name="type" id="type">
                    <option value="1">圆桌会议</option>
                    <option value="2">普通申请</option>
                    <option value="3">会议申请</option>
                    <option value = "4">卫星会议</option>
                     <option value="5">讲坛会议</option>
                    <option value="6">群英会议</option>
                    <option value="7">培训会议</option>
                    <option value = "8">离职申请</option>
                  </select>
                </span>
                    <!-- <input type="text" name="sex" id="" placeholder="" value="{$sale.sex}" class="input-text"> -->
                </div>
                </div>
             <div class="row cl">
               
          
                <label class="form-label col-xs-4 col-sm-2">状态：</label>
                <div class="formControls col-xs-4 col-sm-4">
                <span class="select-box">
				  <select class="select sex" size="1" name="reply_status" id="status">
				    <option value="0">等待</option>
				    <option value="1">回复</option>
                    <option value="2">拒绝</option>
				  </select>
				</span>
                    <!-- <input type="text" name="sex" id="" placeholder="" value="{$sale.sex}" class="input-text"> -->
                </div>
                </div>
      		
            
        <div class="row cl">
       			 <label class="form-label col-xs-2 col-sm-2">申请详情：</label>
                <div class="formControls col-xs-9 col-sm-9">
                    <input type="text" name="apply_content" id="" placeholder="" value="{$result[0].apply_content}" class="input-text">
                </div>
            </div>
         <div class="row cl">
                 <label class="form-label col-xs-2 col-sm-2">回复：</label>
                <div class="formControls col-xs-9 col-sm-9">
                    <input type="text" name="reply_content" id="" placeholder=""  value="{$result[0].reply_content}" class="input-text">
                </div>
            </div>
            <div class="row cl">
                <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                    <button onClick="sub_save();" class="btn btn-secondary radius" type="button"> 提交</button>
                    <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
                </div>
            </div>
        </form>
    </div>
    <script type="text/javascript" src="__JS__/Salemanager/area/jquery.provincesCity.js"></script>
    <script type="text/javascript" src="__JS__/Salemanager/area/provincesData.js"></script>
<!--     <script type="text/javascript" src="__STATIC__/city/jquery.provincesCity.js"></script>
    <script type="text/javascript" src="__STATIC__/city/provincesData.js"></script> -->
    <script type="text/javascript">
                        $(function () {
                            $("#province").ProvinceCity();
             				//选中性别
                            var sex = '<?php echo $sale["sex"] ?>';
                            if(sex=='1'){
                            	   $(".sex").find("option[value='1']").attr("selected",true);
                            }else{
                            		$(".sex").find("option[value='2']").attr("selected",true);
                            }
                            //选中县
                        });

                    /*     function sub_save()
                        {
                            $("#commentFrom").submit();
                        } */
                        function sub_save()
                        {
							
                          //  formData.append("manage_locations", county); 
                         //   formData.append("province", $("#province select:eq(0)").val());
							$.ajax({
                                url: "",
                                type: 'POST',
                                data: $("#commentFrom").serialize(),
                                async: false,
                               
                                success: function (returndata) {

                                    if(returndata.code==0)
                                    {
                                         alert(returndata.message);
                                    }else{
                                         alert(returndata.message);

                                    }
                                    layer_close();
                                    window.location.href="/Admin/Work/Index/index/key/SPGLGUANLI.html";

                                },
                                error: function (returndata) {
                                    alert(returndata);
                                }
                            });
                        }
                        /*
                         参数解释：
                         title	标题
                         url		请求的url
                         id		需要操作的数据id
                         w		弹出层宽度（缺省调默认值）
                         h		弹出层高度（缺省调默认值）
                         */
                        /*管理员-增加*/
                        function admin_add(title, url, w, h) {
                            layer_show(title, url, w, h);
                        }
                        /*管理员-删除*/
                        function admin_del(obj, id) {
                            layer.confirm('确认要删除吗？', function (index) {
                                //此处请求后台程序，下方是成功后的前台处理……

                                $(obj).parents("tr").remove();
                                layer.msg('已删除!', {icon: 1, time: 1000});
                            });
                        }
                        /*管理员-编辑*/
                        function admin_edit(title, url, id, w, h) {
                            layer_show(title, url, w, h);
                        }
                        /*管理员-停用*/
                        function admin_stop(obj, id) {
                            layer.confirm('确认要停用吗？', function (index) {
                                //此处请求后台程序，下方是成功后的前台处理……

                                $(obj).parents("tr").find(".td-manage").prepend('<a onClick="admin_start(this,id)" href="javascript:;" title="启用" style="text-decoration:none"><i class="Hui-iconfont">&#xe615;</i></a>');
                                $(obj).parents("tr").find(".td-status").html('<span class="label label-default radius">已禁用</span>');
                                $(obj).remove();
                                layer.msg('已停用!', {icon: 5, time: 1000});
                            });
                        }

                        /*管理员-启用*/
                        function admin_start(obj, id) {
                            layer.confirm('确认要启用吗？', function (index) {
                                //此处请求后台程序，下方是成功后的前台处理……


                                $(obj).parents("tr").find(".td-manage").prepend('<a onClick="admin_stop(this,id)" href="javascript:;" title="停用" style="text-decoration:none"><i class="Hui-iconfont">&#xe631;</i></a>');
                                $(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">已启用</span>');
                                $(obj).remove();
                                layer.msg('已启用!', {icon: 6, time: 1000});
                            });
                        }
                 $(function(){

                      var type = {$result[0].type};
                    $("#type").val(type);
                      var status = {$result[0].reply_status};
                      $("#status").val(status);
                   
                })

    </script>
</body>
</html>